<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<div class="content-layerbody-main" id="add">
    <form name="credentialForm" id="credentialForm">
        <div class="finan-panel">
            <div class="panel-table">
                <table class="add-table form-table">
                    <tbody>
                    <tr>
                        <th><span class="required">入库原因</span></th>
                        <td>
                            <select class="table-select" name="warehousingReason" id="warehousingReason" style="width: 300px">
                                <option value=''>请选择</option>
                                <c:forEach var="p" items="${warehousingReason}">
                                    <option value="${p.code}">${p.name}</option>
                                </c:forEach>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th><span class="required">归还人</span></th>
                        <td>
                            <div name="checkCertificateUserId">
                                <select class="chooseUser" name="certificateUserId" id="certificateUserId" style="width: 300px">
                                    <option value=""></option>
                                </select>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>备注</th>
                        <td>
                            <textarea class="textarea-style" rows="4" name="remarks" id="remarks" placeholder="500字以内"></textarea>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </form>
</div>

<script>
    $(function () {
        areaLength($('#remarks'), 500)

        $("#warehousingReason").select2({
            placeholder: "请选择",
            width: "300px",
            language: "zh-CN",
            allowClear: true
        });

        chooseUserPlug.init($('.chooseUser'), {
            width: '300px',
            select: false,
            url: sysInfo.basePath + '/zzsc/common/find_user_choose.do',
            // multiple:true,// 单选false或不写该参数，多选true
            otherParam: {
                /**
                 * type: 用户信息选择类型（必填）
                 *       all:全部用户，division：当前登录人所在事业部，department:当前登录人所在部门及以下，role: 查询指定角色用户，
                 * roleCode : 角色Code，（type为role时，必填）
                 * locked: 用户状态，（选填，默认全部状态）
                 *      0、正常；1、锁定；2、离职
                 */
                type: 'all',
                locked: '0'
            }
        });

    });
</script>